﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Laba1
{
   public  class Task: IPrintable
   {
       protected int _passingRating;
       protected int _maximumRating;
       protected string _name;

       public Task(string name, int passingRating, int maximumRating)
       {
           _name = name;
           _passingRating = passingRating;
           _maximumRating = maximumRating;
       }

       public int PassingRating
       {
           get { return _passingRating; }
       }

       public int MaximumRating
       {
           get { return _maximumRating; }
       }

       public bool isPassed(int rating)
       {
           return rating >= _passingRating;
       }

       //потом удалить(печатает задание в консоль)
       public void print()
       {
           Console.WriteLine("Название - {0};", _name);
           Console.WriteLine("Необходимый рейтинг - {0};", _passingRating);
       }


   }
}
